Skip to content

Conversation

@rsh2prasad
Copy link

@rsh2prasad rsh2prasad commented Apr 3, 2025

What changes:
Write the disk and partition usage information to the STATE_DB in redis
The physical memory stats will also be in the same MIB OID

How:
Modify procdockerstatsd to routinely update the redis table

How to verify:
STATE_DB will contain updated "MOUNT_POINTS" entries for the disk usage and "MEMORY_STATS" for physical memory stats
Unit tests added to verify correctness
Coverage tests also added

Description for changelog:
Update the redis STATE_DB for the system disk and partition info and memory stats

Sample entries added to STATE_DB:

127.0.0.1:6379[6]> keys *MOUNT*
1) "MOUNT_POINTS|LastUpdateTime"
2) "MOUNT_POINTS|/host"
3) "MOUNT_POINTS|/var/log"

127.0.0.1:6379[6]> keys *MEMORY*
4) "MEMORY_STATS|Physical"
5) "MEMORY_STATS|Buffers"
5) "MEMORY_STATS|Shared"
5) "MEMORY_STATS|Virtual"
5) "MEMORY_STATS|Cached"
5) "MEMORY_STATS|Swap"

127.0.0.1:6379[6]> hgetall "MOUNT_POINTS|/host"
1) "Filesystem"
2) "/dev/vda3"
3) "Type"
4) "ext4"
5) "1K-blocks"
6) "32847824"
7) "Used"
8) "5704672"
9) "Available"
10) "27126768"

127.0.0.1:6379[6]> hgetall "MOUNT_POINTS|Physical"
1) "1K-blocks"
2) "32847824"
3) "Used"
4) "5704672"

Signed-off-by: Rakshintha Prasad [[email protected]]

@mssonicbld
Copy link

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rsh2prasad rsh2prasad marked this pull request as ready for review April 29, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants